//
//  Person.m
//  Test003_LearnProtocol
//
//  Created by Ronald Ram on 9/26/12.
//  Copyright (c) 2012 Ronald Ram. All rights reserved.
//

#import "Person.h"

@implementation Person


- (id) init
{
    return [self initWithFName:@"peter" AndLName:@"pan"];
}


- (id) initWithFName:(NSString *)fn AndLName:(NSString *)ln
{
    if (self = [super init])
    {
        fname = fn;
        lname = ln;
        age = 10;
    }
    return self;
}



@synthesize fname, lname;


- (void)dealloc
{
    [fname release];
    [lname release];
    [super dealloc];
}


#pragma mark PROTOCOL METHODS

//- (void)setAge:(int) a  { _age = a; }

@synthesize age;

- (void) print
{
    NSLog(@" ");
    //NSLog(@"Name: %@ %@ %i", fname, lname, _age);
    NSLog(@"Name: %@ %@ %i", fname, lname, age);
    NSLog(@" ");
}

@end
